<template>
	<view class="container">
		<view class="bg">
			<!-- <image src="/static/icon/index_bg.png" mode="widthFix"></image> -->
		</view>
		<view class="content">
			<view class="settle-type">
				<view class="img">
					<image src="../../static/icon/settle_icon.png" mode="widthFix"></image>
				</view>
				<view class="left">
					<view class="name">
						{{status=="D0"?"自动结算":"自助计算"}}
					</view>
					<view class="desc">
						当前结算模式
					</view>
				</view>

			</view>
			<view class="tip">
				如需修改结算模式，一天最多修改4次请注意哦!
			</view>
			<view class="notice">
				<view class="title">
					当日出款规则
				</view>
				<view class="list border-bottom">
					<image src="/static/icon/no_1.png" mode="widthFix"></image>
					<text>使用合账本后，请您自助发起结算</text>
				</view>
				<view class="list ">
					<image src="/static/icon/no_2.png" mode="widthFix"></image>
					<text>如有疑问，请咨询在线客服</text>
				</view>
			</view>
		</view>
		<view class="bottom">
			<view class="change">
				<button @click="goChange()">修改结算模式</button>
			</view>

			<view class="logo">
				<image src="../../static/icon/index_logo.png" mode="heightFix"></image>
			</view>

		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from "vue";
import{withdrawSwitchQuery}from "/src/api/mine.js";
import {
		onLoad

	} from "@dcloudio/uni-app";
	import {
		useStore
	} from "@/store/index";
		const store = useStore();
	let params = ref({
		lsMerchantNo: store.currentMerchantInfomation.lsMerchantNo,
	
	})
	const status=ref(null)
	onLoad((val) => {
		
		
		queryWithdrawSwitch();
		
	});
	function queryWithdrawSwitch(){
		withdrawSwitchQuery(params.value).then((res) => {
				console.log("res-red", res)
status.value=res;
			})
			.catch((err) => {

			});
	}
	function goChange() {
		uni.navigateTo({
			url: `/settle/change/index`
		})
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>